package cn.org.donald.framework.handler;

import cn.org.donald.service.game.TestService;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.annotation.XxlJob;
import com.xxl.job.core.log.XxlJobLogger;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.stereotype.Component;

/**
 * @author ： Donald
 * @date ： 2020/11/25 19:49
 * @description：
 */
@Component
public class TestExecutorHandler {

    @Reference(interfaceClass = TestService.class, version = "1.0.0", group = "donald")
    private TestService testService;

    @XxlJob("testExecutorHandler")
    public ReturnT<String> execute(String s) throws Exception {
        XxlJobLogger.log("Doing job test");
        testService.setExecutor("I am the job");
        return null;
    }
}
